interface PersonInterface {
  name: string
  age: number
  sayName: () => void
}

class Person implements PersonInterface {
  name: string
  age: number
  constructor(name:string,age: number) {
    this.name = name
    this.age = age
  }
  sayName() {
    console.log(this.name)
  }
}
const will = new Person("will", 25)
will.sayName()